package com.tuanzi.loan.web.lazy.credithousekeeper;

import com.tuanzi.loan.business.service.credithousekeeper.CreditCompensatoryOrderService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.credithousekeeper.CreditCompensatoryOrderRequest;
import com.tuanzi.loan.vo.response.credithousekeeper.CreditCompensatoryOrderResponse;
import org.springframework.data.domain.Page;

import java.io.Serializable;
/**
 * @Description:    信用卡代偿订单lazymodel
 * @Author:         xionghao
 * @CreateDate:     2018-7-18
 */
public class CreditCompensatoryOrderLazyDataModel
        extends BaseLazyDataModel<CreditCompensatoryOrderRequest,CreditCompensatoryOrderResponse> implements Serializable{

    private static final long serialVersionUID = 1042338719016439608L;

    private CreditCompensatoryOrderService creditCompensatoryOrderService = SpringContextHolder.getBean(CreditCompensatoryOrderService.class);

    public CreditCompensatoryOrderLazyDataModel(CreditCompensatoryOrderRequest creditCompensatoryOrderRequest) {
        super(creditCompensatoryOrderRequest);
    }

    @Override
    protected Page<CreditCompensatoryOrderResponse> doLoad(PageSearcher<CreditCompensatoryOrderRequest> pageSearcher) {
        return creditCompensatoryOrderService.list(pageSearcher);
    }
}
